import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/adminLayout.vue'
import Recharge from './views/centre/recharge.vue'
import Finance from './views/centre/finance.vue'
import Msg from './views/centre/msg.vue'
import Withdrawal from './views/centre/withdrawal.vue'
import Article from './views/article/article.vue'
import List from './views/article/list.vue'
import Order from './views/order/order.vue'
import Add from './views/keyword/add.vue'
import Config from './views/keyword/config.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      children: [{
          path: '/home',
          name: 'home',
          components: {
            main: Home
          }
        },
        {
          path: '/centre/recharge',
          name: 'recharge',
          components: {
            main: Recharge
          }
        },
        {
          path: '/centre/finance',
          name: 'finance',
          components: {
            main: Finance
          }
        },
        {
          path: '/centre/msg',
          name: 'msg',
          components: {
            main: Msg
          }
        },
        {
          path: '/centre/withdrawal',
          name: 'withdrawal',
          components: {
            main: Withdrawal
          }
        },
        {
          path: '/article/article',
          name: 'article',
          components: {
            main: Article
          }
        },
        {
          path: '/article/list',
          name: 'list',
          components: {
            main: List
          }
        },
        {
          path: '/order/order',
          name: 'order',
          components: {
            main: Order
          }
        },
        {
          path: '/keyword/add',
          name: 'add',
          components: {
            main: Add
          }
        },
        {
          path: '/keyword/config',
          name: 'config',
          components: {
            main: Config
          }
        },

      ]
    }
  ]
})
